{% extends "links/base.html" %}
{% load staticfiles %}
{% load crispy_forms_tags %}

{% block title %}
New link
{% endblock %}

{% block extrahead %}
  <link rel="stylesheet" type="text/css" href="{% static "js-custom-themes/jquery-ui/theme/jquery-ui.css" %}" />
  <link href="{% static "js-custom-themes/tagit/theme/jquery.tagit.css" %}" rel="stylesheet" type="text/css"/>
{% endblock %}


{% block breadcrumb_container %} {% endblock %}
{% block footer_container %} {% endblock %}

{% block content %}
  {% crispy form %}
{% endblock %}


{% block last_body %}
<script type="text/javascript" src="{% static "bower_components/jquery-ui/ui/minified/jquery-ui.min.js" %}" ></script>
<script type="text/javascript" src="{% static "bower_components/tag-it/js/tag-it.min.js" %}" ></script>
<script type="text/javascript">
  $(function(){
      $("#id_tags").tagit({
        availableTags: [{{ tags|safe }}],
        autocomplete: {delay: 0, minLength: 2},
        allowSpaces: true
    });
  });
</script>
{% endblock last_body %}
